<?php

/**
 * my_courses actions.
 *
 * @package    academia_de_escritores
 * @subpackage my_courses
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class my_coursesActions extends sfAeAction
{
 /**
  * Executes index action
  *
  * @var User
  */
  
  
  private function getDbUser(){
  	return $this->getUser()->getGuardUser()->getUser();
  }
  public function executeIndex(sfWebRequest $request)
  {
    $this->forward('default', 'module');
  }
  
  public function executeMyCourses(sfWebRequest $r){
  	$User=$this->getDbUser();
  	$q=InscriptionTable::getInstance()->getInscriptionCourseQuery();
  	$q->andWhere(InscriptionTable::SHORT_ALIAS.".user_id=?",$User->getUserId());
  	$this->inscriptionCollection=$q->execute();
  	
  }
}
